package com.hmall.item.web;

import com.hmall.common.dto.PageDTO;
import com.hmall.item.pojo.Item;
import com.hmall.item.pojo.RequestParams;
import com.hmall.item.service.IItemService;
import com.hmall.item.service.impl.ItemService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController
@RequestMapping("/item")
public class ItemController {

    @Autowired
    private IItemService itemService;

    //搜索商品信息
    @PostMapping("/list")
    public PageDTO<Item> itemPageInfo(@RequestBody RequestParams params){
        return itemService.search(params);
    }

}
